package com.qf.controller;


import com.qf.service.UserService;
import com.qf.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/api")
public class DeleteUser{
    @Autowired
    private UserService userService;
    @PostMapping("/deleteUser")
    public R deleteUser(@RequestParam Integer id){
        userService.delete(id);
        return R.ok();
    }
    @PostMapping("/batchDeleteUser")
    public R batchDeleteUser(@RequestParam List<Integer> ids){
        userService.batchDeleteUser(ids);
        return R.ok();
    }

}
